package com.ruoyi.web.group.matches.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.web.group.matches.entity.Matches;
import com.ruoyi.web.group.matches.mapper.MatchesMapper;
import com.ruoyi.web.group.matches.service.MatchesService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MatchesServiceImpl extends ServiceImpl<MatchesMapper, Matches> implements MatchesService {
    @Override
    public List<Matches> findList(Matches matches) {
        QueryWrapper<Matches> wrapper = new QueryWrapper<>();
        if (matches.getName()!=null ){
            wrapper.like("name",matches.getName());
        }
        Page pages = baseMapper.selectPage(new Page<Matches>(1,10), wrapper);
        return  pages.getRecords();
    }
}
